home *** CD-ROM | disk | FTP | other *** search
-
- Listing 1. SCASB Method of Finding Terminator Zero
-
- string DB "This is a string",0
- .....
- cld ; clear direction
- mov cx,0ffffh ; set counter
- mov di,offset string ; load offset
- mov al,0 ; load comparison value
- repnz scasb ; find the zero
- not cx ; take ones complement
- dec cx ; adjust length
- .....
-